# cmake_minimum_required(VERSION <specify CMake version here>)
project(unix_environment_source C)

set(CMAKE_C_STANDARD 11)

include_directories(db)
include_directories(include)
include_directories(ipc1)
include_directories(ipc2/open)
include_directories(ipc2/open.fe)
include_directories(ipc2/opend)
include_directories(ipc2/opend.fe)
include_directories(printer)

add_executable(unix_environment_source
        advio/deadlock.c
        advio/lockfile.c
        advio/mandatory.c
        advio/mcopy2.c
        advio/nonblockw.c
        advio/readn.c
        advio/rot13a.c
        advio/writen.c
        daemons/init.c
        daemons/reread.c
        daemons/reread2.c
        daemons/single.c
        datafiles/getpwnam.c
        datafiles/strftime.c
        db/apue_db.h
        db/db.c
        db/t4.c
        environ/cmd1.c
        environ/cmd2.c
        environ/doatexit.c
        environ/echoarg.c
        environ/getrlimit.c
        environ/hello1.c
        environ/opendata.c
        environ/scope.c
        environ/testjmp.c
        exercises/asyncsocket.c
        exercises/bo.c
        exercises/fifo1.c
        exercises/fmemopen.c
        exercises/getlogin.c
        exercises/getpw44bsd.c
        exercises/getpwsvr4.c
        exercises/goodexit.c
        exercises/longpath.c
        exercises/openmax.c
        exercises/pendlock.c
        exercises/pollmsg2.c
        exercises/prtime.c
        exercises/sizepipe.c
        exercises/sleep.c
        exercises/sleepus_poll.c
        exercises/sleepus_select.c
        exercises/vfork3.c
        exercises/zombie.c
        filedir/access.c
        filedir/cdpwd.c
        filedir/changemod.c
        filedir/devrdev.c
        filedir/filetype.c
        filedir/ftw8.c
        filedir/mycd.c
        filedir/umask.c
        filedir/unlink.c
        filedir/zap.c
        fileio/fileflags.c
        fileio/hole.c
        fileio/mycat.c
        fileio/seek.c
        fileio/setfl.c
        include/apue.h
        intro/getcputc.c
        intro/hello.c
        intro/ls1.c
        intro/mycat.c
        intro/shell1.c
        intro/shell2.c
        intro/testerror.c
        intro/uidgid.c
        ipc1/add2.c
        ipc1/add2stdio.c
        ipc1/devzero.c
        ipc1/myuclc.c
        ipc1/pipe1.c
        ipc1/pipe2.c
        ipc1/pipe4.c
        ipc1/popen.c
        ipc1/popen1.c
        ipc1/popen2.c
        ipc1/slock.c
        ipc1/slock.h
        ipc1/tellwait.c
        ipc1/tshm.c
        ipc2/open/main.c
        ipc2/open/open.c
        ipc2/open/open.h
        ipc2/open.fe/main.c
        ipc2/open.fe/open.c
        ipc2/open.fe/open.h
        ipc2/opend/cliargs.c
        ipc2/opend/client.c
        ipc2/opend/loop.poll.c
        ipc2/opend/loop.select.c
        ipc2/opend/main.c
        ipc2/opend/opend.h
        ipc2/opend/request.c
        ipc2/opend.fe/cliargs.c
        ipc2/opend.fe/main.c
        ipc2/opend.fe/opend.h
        ipc2/opend.fe/request.c
        ipc2/bindunix.c
        ipc2/pollmsg.c
        ipc2/recvfd2.c
        ipc2/sendfd2.c
        ipc2/sendmsg.c
        lib/bufargs.c
        lib/cliconn.c
        lib/clrfl.c
        lib/daemonize.c
        lib/error.c
        lib/errorlog.c
        lib/lockreg.c
        lib/locktest.c
        lib/nspipe.c
        lib/openmax.c
        lib/Orecvfd.c
        lib/pathalloc.c
        lib/popen.c
        lib/prexit.c
        lib/prmask.c
        lib/ptyfork.c
        lib/ptyopen.c
        lib/readn.c
        lib/recvfd.c
        lib/semaph.c
        lib/senderr.c
        lib/sendfd.c
        lib/servaccept.c
        lib/servlisten.c
        lib/setfd.c
        lib/setfl.c
        lib/signal.c
        lib/signalintr.c
        lib/sleep.c
        lib/sleepus.c
        lib/spipe.c
        lib/strerror.c
        lib/tellwait.c
        lib/ttymodes.c
        lib/writen.c
        printer/ipp.h
        printer/print.c
        printer/print.h
        printer/printd.c
        printer/util.c
        proc/echoall.c
        proc/exec1.c
        proc/exec2.c
        proc/fork1.c
        proc/fork2.c
        proc/nice.c
        proc/pracct.c
        proc/pruids.c
        proc/system.c
        proc/systest1.c
        proc/systest3.c
        proc/tellwait1.c
        proc/tellwait2.c
        proc/test1.c
        proc/times1.c
        proc/vfork1.c
        proc/wait1.c
        pty/driver.c
        pty/loop.c
        pty/main.c
        relation/orphan3.c
        signals/abort.c
        signals/child.c
        signals/critical.c
        signals/mask.c
        signals/read1.c
        signals/read2.c
        signals/reenter.c
        signals/setops.c
        signals/sigtstp.c
        signals/sigusr.c
        signals/sleep1.c
        signals/sleep2.c
        signals/suspend1.c
        signals/suspend2.c
        signals/system.c
        signals/systest2.c
        signals/tsleep2.c
        sockets/clconn.c
        sockets/clconn2.c
        sockets/findsvc.c
        sockets/initsrv1.c
        sockets/initsrv2.c
        sockets/ruptime-dg.c
        sockets/ruptime.c
        sockets/ruptimed-dg.c
        sockets/ruptimed-fd.c
        sockets/ruptimed.c
        stdio/buf.c
        stdio/fgetsfputs.c
        stdio/getcharbug.c
        stdio/getcputc.c
        stdio/memstr.c
        stdio/mkstemp.c
        stdio/tempfiles.c
        termios/csize.c
        termios/ctermid.c
        termios/getpass.c
        termios/isatty.c
        termios/settty.c
        termios/t_getpass.c
        termios/t_isatty.c
        termios/t_raw.c
        termios/t_ttyname.c
        termios/ttyname.c
        termios/winch.c
        threadctl/atfork.c
        threadctl/detach.c
        threadctl/getenv1.c
        threadctl/getenv2.c
        threadctl/getenv3.c
        threadctl/suspend.c
        threadctl/timeout.c
        threads/badexit2.c
        threads/barrier.c
        threads/cleanup.c
        threads/condvar.c
        threads/exitstatus.c
        threads/maketimeout.c
        threads/mutex1.c
        threads/mutex2.c
        threads/mutex3.c
        threads/rwlock.c
        threads/threadid.c
        threads/timedlock.c)
